﻿// =====================================================================
//
//  This file is part of the Microsoft Dynamics CRM SDK code samples.
//
//  Copyright (C) Microsoft Corporation.  All rights reserved.
//
//  This source code is intended only as a supplement to Microsoft
//  Development Tools and/or on-line documentation.  See these other
//  materials for detailed information regarding Microsoft code samples.
//
//  THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
//  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
//  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
//  PARTICULAR PURPOSE.
//
// =====================================================================


namespace SL.IdentityModel.Claims
{
	/// <summary>
	/// This class contains claim information
	/// </summary>
	public class Claim
	{
		private string _issuer;
		private string _originalIssuer;
		private string _type;
		private string _value;
		private string _valueType;

		/// <summary>
		/// Issuer of the claim
		/// </summary>
		public string Issuer
		{
			get { return _issuer; }
		}

		/// <summary>
		/// Original Issuer of the claim. This will be different then Issuer if the claim was originally issued by a differenet sts
		/// and has been re-issued
		/// </summary>
		public string OriginalIssuer
		{
			get { return _originalIssuer; }
		}

		/// <summary>
		/// type of the claim
		/// </summary>
		public string ClaimType
		{
			get { return _type; }
		}

		/// <summary>
		/// value of the claim
		/// </summary>
		public string Value
		{
			get { return _value; }
		}

		/// <summary>
		/// the type of claim value
		/// </summary>
		public string ValueType
		{
			get { return _valueType; }
		}

		/// <summary>
		/// Creates an instance of the Claim class
		/// </summary>
		/// <param name="issuer">sets Issuer</param>
		/// <param name="originalIssuer">sets OriginalIssuer</param>
		/// <param name="type">sets claim ClaimType</param>
		/// <param name="value">sets Value</param>
		/// <param name="valueType">sets ValueType</param>
		public Claim(string issuer, string originalIssuer, string type, string value, string valueType)
		{
			_issuer = issuer;
			_originalIssuer = originalIssuer;
			_type = type;
			_value = value;
			_valueType = valueType;
		}
	}
}
